package com.example.servicebase.client;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@Component
@FeignClient(value = "service-order",fallbackFactory = OrderClientFallbackFactory.class)
public interface OrderClient {
    //根据课程id和用户id查询订单，根据状态判断当前用户是否成功购买了当前课程
    @GetMapping("/eduorder/order/isBuyCourse/{courseId}/{userId}")
    public boolean isBuyCourse(@PathVariable("courseId") String courseId , @PathVariable("userId") String userId);
}
